/* $Header: err_conv.c,v 2.2 01/10/02 10:26:55 przybyls Exp $ */

/***********************************************************************/
/*                                                                     */
/*                  Copyright Hewlett-Packard Co. 1991, 1992           */
/*                                                                     */
/***********************************************************************/

/***********************************************************************/
/* MODULE NAME:  err_conv.c                                            */
/* ============                                                        */
/*                                                                     */
/* Author:  Lesley Freed                                               */
/*                                                                     */
/* MODULE PURPOSE:  To process any exceptions which require            */
/*                  special handling to perform a conversion before    */
/*                  being displayed or stored.                         */
/*                                                                     */
/***********************************************************************/


/*****************************/
/*   GLOBAL INCLUDE FILES    */
/*****************************/

#include <typedefs.h>
#include <p_wkfile.h>
#include <wkfile.h>
#include <ramps.h>
#include <zone_config.h>
#include <p_status.h>
#include <zone_status.h>
#include <status.h>
#include <error.h>
#include <keyboard.h>
#include <messages.h>
#include <sig_types.h>
#include <sig_ui.h>

#include <exception.h>
#include <err_handler.h>
#include <glp.h>

#include <valve_ui.h>

#include <sequence.h>

/*****************************/
/*   LOCAL INCLUDE FILES     */
/*****************************/

/*****************************/
/*   GLOBAL VARIABLES        */
/*****************************/


/*****************************/
/*   EXTERNAL VARIABLES      */
/*****************************/


/*****************************/
/*   LOCAL DEFINES           */
/*****************************/

/*****************************/
/*   STATIC VARIABLES        */
/*****************************/


/*****************************/
/*   IMPLEMENT SECTION       */
/*****************************/

 /**********************************************************************

    S t a t u s   D i s p l a y   B a s e d   F u n c t i o n s

  **********************************************************************/

#pragma SECTION PROG=SysCode

U_INT16 GetStatusMsgNo( EXCEPTION flag )
{
   U_INT16 result;
   result = NO_MSG;

   if (( flag >= (EXCEPTION) 0 ) && ( flag < LAST_EXCEPTION_NAME ))
   {
        switch( Exception_Info[ flag ].conv_code )
        {
           case F_DET_GAS1_NR_CODE:
           case MAN_F_DET_GAS1_NR:
              result = GetDetGas1Msg( FRONT, (U_INT16)DET_GAS_STATUS );
              break;
           case F_DET_GAS2_NR_CODE:
           case MAN_F_DET_GAS2_NR:
              result = GetDetGas2Msg( FRONT, (U_INT16)DET_GAS_STATUS );
              break;
           case F_DET_GAS3_NR_CODE:
           case MAN_F_DET_GAS3_NR:
              result = GetDetGas3Msg( FRONT, (U_INT16)DET_GAS_STATUS );
              break;
           case B_DET_GAS1_NR_CODE:
           case MAN_B_DET_GAS1_NR:
              result = GetDetGas1Msg( BACK, (U_INT16)DET_GAS_STATUS );
              break;
           case B_DET_GAS2_NR_CODE:
           case MAN_B_DET_GAS2_NR:
              result = GetDetGas2Msg( BACK, (U_INT16)DET_GAS_STATUS );
              break;
           case B_DET_GAS3_NR_CODE:
           case MAN_B_DET_GAS3_NR:
              result = GetDetGas3Msg( BACK, (U_INT16)DET_GAS_STATUS );
              break;
           default:
              result = Exception_Info[ flag ].status_msg_no;
        }
   }

   return result;
}

/***********************************************************************/
/* FUNCTION:  GetStatusMsgParam1                                       */
/* ========                                                            */
/*                                                                     */
/* PURPOSE:  To return the optional parameter # of status messages     */
/*                                                                     */
/* RETURNED VALUE: INT32                                               */
/*                                                                     */
/* GLOBALS USED:  Exception_Info                                       */
/*                                                                     */
/* CALLS:                                                              */
/*                                                                     */
/* LIMITATIONS:  This assumes that the configuration of the GC has     */
/*               not changed since the status exception bit was set.   */
/*                                                                     */
/***********************************************************************/

INT32 GetStatusParam1( EXCEPTION flag )
{
/*---------begin changed by wangwei-------------*/
  return 0;
//   CONV_CODE conv_code;
//
//   conv_code = Exception_Info[ flag ].conv_code;
//
//   switch( conv_code )
//  {
//      case GSV1_CONV_CODE:
//         return GetGasSamplingValve1();
//      case GSV2_CONV_CODE:
//         return GetGasSamplingValve2();
//      case ALS_ERR_CONV_CODE:
//         return Last_Inj_Abort;
//      case HS_VIAL_CONV_CODE:
//         return HS_Vial_Not_Found;
//      default:
//         return 0;
//   }
/*---------------end changed----------------------*/
}

/***********************************************************************/
/* FUNCTION:  GetGlpMsgNo                                              */
/* ========                                                            */
/*                                                                     */
/* PURPOSE:  To use the conversion code value, conv_code, in the       */
/*           exception table to determine whether or not the glp       */
/*           message should be gotten by alternate means.              */
/*                                                                     */
/* RETURNED VALUE:                                                     */
/*                                                                     */
/* GLOBALS USED:                                                       */
/*                                                                     */
/* CALLS:                                                              */
/*                                                                     */
/* LIMITATIONS:                                                        */
/*                                                                     */
/***********************************************************************/

U_INT16 GetGlpMsgNo( EXCEPTION i, INT32 value )
{
   U_INT16 msg_no;

   switch( Exception_Info[ i ].conv_code )
   {
      case F_DET_GAS1_NR_CODE:
         msg_no = GetDetGas1Msg( FRONT, (U_INT16)DET_GAS_GLP );
         break;
      case F_DET_GAS2_NR_CODE:
         msg_no = GetDetGas2Msg( FRONT, (U_INT16)DET_GAS_GLP );
         break;
      case F_DET_GAS3_NR_CODE:
         msg_no = GetDetGas3Msg( FRONT, (U_INT16)DET_GAS_GLP );
         break;
      case B_DET_GAS1_NR_CODE:
         msg_no = GetDetGas1Msg( BACK, (U_INT16)DET_GAS_GLP );
         break;
      case B_DET_GAS2_NR_CODE:
         msg_no = GetDetGas2Msg( BACK, (U_INT16)DET_GAS_GLP );
         break;
      case B_DET_GAS3_NR_CODE:
         msg_no = GetDetGas3Msg( BACK, (U_INT16)DET_GAS_GLP );
         break;
      case MAN_F_DET_GAS1_NR:
         msg_no = GetDetGas1Msg( FRONT, (U_INT16)MAN_DET_GAS_GLP );
         break;
      case MAN_F_DET_GAS2_NR:
         msg_no = GetDetGas2Msg( FRONT, (U_INT16)MAN_DET_GAS_GLP );
         break;
      case MAN_F_DET_GAS3_NR:
         msg_no = GetDetGas3Msg( FRONT, (U_INT16)MAN_DET_GAS_GLP );
         break;
      case MAN_B_DET_GAS1_NR:
         msg_no = GetDetGas1Msg( BACK, (U_INT16)MAN_DET_GAS_GLP );
         break;
      case MAN_B_DET_GAS2_NR:
         msg_no = GetDetGas2Msg( BACK, (U_INT16)MAN_DET_GAS_GLP );
         break;
      case MAN_B_DET_GAS3_NR:
         msg_no = GetDetGas3Msg( BACK, (U_INT16)MAN_DET_GAS_GLP );
         break;
      case PRES_CONV_CODE:
         /* Get the appropriate pressure msg based upon the current units */
         msg_no = GetGlpPresMsg( value );
         break;
      default:
         msg_no = Exception_Info[ i ].glp_msg_no;
   }

   return msg_no;
}

#pragma SECTION UNDO

/***********************************************************************/
/* FUNCTION:  GetPopUpMsgNo                                            */
/* ========                                                            */
/*                                                                     */
/* PURPOSE:  To retrieve the appropriate pop-up message for an         */
/*           exception display.                                        */
/*                                                                     */
/* RETURNED VALUE:  U_INT32 msg_no                                     */
/*                                                                     */
/* GLOBALS USED:  Exception_Info                                       */
/*                                                                     */
/* CALLS:  none                                                        */
/*                                                                     */
/* LIMITATIONS:                                                        */
/*                                                                     */
/***********************************************************************/

U_INT16 GetPopUpMsgNo( EXCEPTION i )
{
   return Exception_Info[ i ].msg_no;
}


static U_INT16 GetInjectModeMsg( INT32 value_2 )
{
    switch ( (INJ_MODE) value_2 )
    {
        case SPLIT:            return MSG_MODE_SPLIT;
        case SPLITLESS:        return MSG_MODE_SPLITLESS;
        case SPLITLESS_PULSED: return MSG_MODE_SPLITLESS_PULSED;
        case SPLIT_PULSED:     return MSG_MODE_SPLIT_PULSED;
        case SOLVENT_VENT:     return MSG_MODE_SOLVENT_VENT;
        case DIRECT:           return MSG_MODE_DIRECT_;
        default:               return MSG_SEL_UNK;
    }
}

static U_INT16 GetInletPresMsg( INT32 value_2 )
{
    switch ( (PRES_UNITS) value_2 )
    {
       default:
        case DISPLAY_PSI: return MSG_INLET_PRES_PSI;
        case DISPLAY_BAR: return MSG_INLET_PRES_BAR;
        case DISPLAY_KPA: return MSG_INLET_PRES_KPA;
    }
}

static U_INT16 GetInletPulsePresMsg( INT32 value_2 )
{
    switch ( (PRES_UNITS) value_2 )
    {
       default:
        case DISPLAY_PSI: return MSG_PULSE_PRES_PSI;
        case DISPLAY_BAR: return MSG_PULSE_PRES_BAR;
        case DISPLAY_KPA: return MSG_PULSE_PRES_KPA;
    }
}

static U_INT16 GetInletGasTypeMsg( INT32 value_2 )
{
    switch ( (GAS_TYPE) value_2 )
    {
       default:
        case N2:   return MSG_GAS_TYPE_N2;
        case H2:   return MSG_GAS_TYPE_H2;
        case He:   return MSG_GAS_TYPE_HE;
        case ArMe: return MSG_GAS_TYPE_ARCH4;
    }
}

static U_INT16 GetInletTypeMsg( INT32 value_2 )
{
    switch ( value_2 )
    {
        case MANUAL_SS:    return MSG_GAS_TYPE_N2;
        case MANUAL_COC:   return MSG_GAS_TYPE_H2;
        case MANUAL_PP:    return MSG_GAS_TYPE_HE;
       default:
        case UNKNOWN:   return MSG_GAS_TYPE_ARCH4;
    }
}

static U_INT16 GetDetCalPresMsg( INT32 value_2 )
{
    switch (  value_2 )
    {
       default:
        case 1: return GLP_DET_GAS1_PRES_CAL;
        case 2: return GLP_DET_GAS2_PRES_CAL;
        case 3: return GLP_DET_GAS3_PRES_CAL;
    }
}

static U_INT16 GetInletCalPresMsg( INT32 value_2 )
{
    switch ( (PRES_UNITS) value_2 )
    {
       default:
        case DISPLAY_PSI: return MSG_INLET_CAL_PRES_PSI;
        case DISPLAY_BAR: return MSG_INLET_CAL_PRES_BAR;
        case DISPLAY_KPA: return MSG_INLET_CAL_PRES_KPA;
    }
}

static U_INT16 GetColControlMsg( INT32 value_2 )
{
    switch ( (CONTROL_MODE) value_2 )
    {
       default:
        case CONST_PRES:   return MSG_MODE_PRESSURE;
        case CONST_FLOW:   return MSG_MODE_CONST_FLOW;
        case RAMP_PRES:    return MSG_MODE_RAMPED_PRES;
        case RAMP_FLOW:    return MSG_MODE_RAMPED_FLOW;
    }
}

static U_INT16 GetColSourceMsg( INT32 value_2 )
{
    switch ( (SOURCE_CONNECTION) value_2 )
    {
        case FRNT_INLET:   return MSG_INLET_FRONT;
        case BACK_INLET:   return MSG_INLET_BACK;
        case AUX_3:        return MSG_INLET_AUX;       /* value_1 must contain the aux number ! */
        case AUX_4:        return MSG_INLET_AUX;
        case AUX_5:        return MSG_INLET_AUX;
       default:
        case UNKNOWN_SOURCE:  return MSG_INLET_UNSPECIFIED;
    }
}

static U_INT16 GetColOutletMsg( INT32 value_2 )
{
    switch ( (OUTLET_CONNECTION) value_2 )
    {
        case FRNT_DET:     return MSG_DET_FRONT;
        case BACK_DET:     return MSG_DET_BACK;
        case AED:          return MSG_DET_AED;
        case MSD:          return MSG_DET_MSD;
       default:
        case UNKNOWN_OUTLET: return MSG_DET_OTHER;
    }
}

static U_INT16 GetColPressureMsg( INT32 value_2 )
{
    switch ( (PRES_UNITS) value_2 )
    {
       default:
        case DISPLAY_PSI: return MSG_COLUMN_PRES_PSI;
        case DISPLAY_BAR: return MSG_COLUMN_PRES_BAR;
        case DISPLAY_KPA: return MSG_COLUMN_PRES_KPA;
    }
}



static U_INT16 GetColCorrectPresMsg( INT32 value_2 )
{
    switch ( (PRES_UNITS) value_2 )
    {
       default:
        case DISPLAY_PSI: return MSG_COL_CORRECT_PRES_PSI;
        case DISPLAY_BAR: return MSG_COL_CORRECT_PRES_BAR;
        case DISPLAY_KPA: return MSG_COL_CORRECT_PRES_KPA;
    }
}

static U_INT16 GetInitPresMsg( INT32 value_2 )
{
    switch ( (PRES_UNITS) value_2 )
    {
       default:
        case DISPLAY_PSI: return MSG_INIT_PRES_PSI;
        case DISPLAY_BAR: return MSG_INIT_PRES_BAR;
        case DISPLAY_KPA: return MSG_INIT_PRES_KPA;
    }
}

static U_INT16 GetPresRate1Msg( INT32 value_2 )
{
    switch ( (PRES_UNITS) value_2 )
    {
       default:
        case DISPLAY_PSI: return MSG_PRES_RATE1_PSI;
        case DISPLAY_BAR: return MSG_PRES_RATE1_BAR;
        case DISPLAY_KPA: return MSG_PRES_RATE1_KPA;
    }
}

static U_INT16 GetFinalPres1Msg( INT32 value_2 )
{
    switch ( (PRES_UNITS) value_2 )
    {
       default:
        case DISPLAY_PSI: return MSG_FINAL_PRES1_PSI;
        case DISPLAY_BAR: return MSG_FINAL_PRES1_BAR;
        case DISPLAY_KPA: return MSG_FINAL_PRES1_KPA;
    }
}

static U_INT16 GetPresRate2Msg( INT32 value_2 )
{
    switch ( (PRES_UNITS) value_2 )
    {
       default:
        case DISPLAY_PSI: return MSG_PRES_RATE2_PSI;
        case DISPLAY_BAR: return MSG_PRES_RATE2_BAR;
        case DISPLAY_KPA: return MSG_PRES_RATE2_KPA;
    }
}

static U_INT16 GetFinalPres2Msg( INT32 value_2 )
{
    switch ( (PRES_UNITS) value_2 )
    {
       default:
        case DISPLAY_PSI: return MSG_FINAL_PRES2_PSI;
        case DISPLAY_BAR: return MSG_FINAL_PRES2_BAR;
        case DISPLAY_KPA: return MSG_FINAL_PRES2_KPA;
    }
}

static U_INT16 GetPresRate3Msg( INT32 value_2 )
{
    switch ( (PRES_UNITS) value_2 )
    {
       default:
        case DISPLAY_PSI: return MSG_PRES_RATE3_PSI;
        case DISPLAY_BAR: return MSG_PRES_RATE3_BAR;
        case DISPLAY_KPA: return MSG_PRES_RATE3_KPA;
    }
}

static U_INT16 GetFinalPres3Msg( INT32 value_2 )
{
    switch ( (PRES_UNITS) value_2 )
    {
       default:
        case DISPLAY_PSI: return MSG_FINAL_PRES3_PSI;
        case DISPLAY_BAR: return MSG_FINAL_PRES3_BAR;
        case DISPLAY_KPA: return MSG_FINAL_PRES3_KPA;
    }
}

static U_INT16 GetColPostPresMsg( INT32 value_2 )
{
    switch ( (PRES_UNITS) value_2 )
    {
       default:
        case DISPLAY_PSI: return MSG_COL_POST_PRES_PSI;
        case DISPLAY_BAR: return MSG_COL_POST_PRES_BAR;
        case DISPLAY_KPA: return MSG_COL_POST_PRES_KPA;
    }
}
static U_INT16 GetDetMkupModeMsg( INT32 value_2 )
{
    switch ( (ON_OFF) value_2 )
    {
        case ON:  return MSG_MODE_COL_MKUP_CONST;
       default:
        case OFF: return MSG_MODE_CONST_MKUP_FLOW;
    }
}
static U_INT16 GetDetUtilFlowMsg( INT32 value_2 )
{
    switch ( (EEPROM_DET_TYPE) value_2 )
    {
        case EPC_FID:  return GLP_AIR_FLOW;
        case EPC_ECD:  return GLP_ANODE_FLOW;
        case EPC_TCD:  return GLP_REF_FLOW;
        case EPC_NPD:  return GLP_AIR_FLOW;
       default:
        case EPC_FPD:  return GLP_OXIDIZER_FLOW;
    }
}

static U_INT16 GetDetUtilOnMsg( INT32 value_2 )
{
    switch ( (EEPROM_DET_TYPE) value_2 )
    {
        case MAN_FID:
        case EPC_FID:  return MSG_AIR_ON;
        case MAN_ECD:
        case EPC_ECD:  return MSG_ANODE_ON;
        case MAN_TCD:
        case EPC_TCD:  return MSG_REFERENCE_ON;
        case MAN_NPD:
        case EPC_NPD:  return MSG_AIR_ON;
        case MAN_FPD:
       default:
        case EPC_FPD:  return GLP_OXIDIZER_ON;
    }
}


static U_INT16 GetDetUtilOffMsg( INT32 value_2 )
{
    switch ( (EEPROM_DET_TYPE) value_2 )
    {
        case MAN_FID:
        case EPC_FID:  return MSG_AIR_OFF;
        case MAN_ECD:
        case EPC_ECD:  return MSG_ANODE_OFF;
        case MAN_TCD:
        case EPC_TCD:  return MSG_REFERENCE_OFF;
        case MAN_NPD:
        case EPC_NPD:  return MSG_AIR_OFF;
        case MAN_FPD:
       default:
        case EPC_FPD:  return GLP_OXIDIZER_OFF;
    }
}

static U_INT16 GetDetFpdUtilTypeMsg( INT32 value_2 )
{
    switch ( value_2 )
    {
       case O2:   return MSG_OXIDIZER_O2;
       default:
       case Air:  return MSG_OXIDIZER_AIR;
    }
}

static U_INT16 GetDetTcdUtilTypeMsg( INT32 value_2 )
{
    switch ( value_2 )
    {
       case ArMe: return GLP_TC_REF_ARME;
       case H2:   return GLP_TC_REF_H2;
       case He:   return GLP_TC_REF_HE;
       default:
       case N2:   return GLP_TC_REF_N2;
    }
}

static U_INT16 GetDetTcdUtilMugTypeMsg( INT32 value_2 )
{
    switch ( value_2 )
    {
       case ArMe: return GLP_MKUP_REF_ARCH4;
       case H2:   return MSG_MKUP_REF_H2;
       case He:   return MSG_MKUP_REF_HE;
       default:
       case N2:   return MSG_MKUP_REF_N2;
    }
}

static U_INT16 GetDetEcdUtilTypeMsg( INT32 value_2 )
{
    switch ( value_2 )
    {
       case ArMe: return GLP_MKUP_PURGE_ARCH4;
       case He:   return GLP_MKUP_PURGE_HE;
       default:
       case N2:   return GLP_MKUP_PURGE_N2;
    }
}

static U_INT16 GetDetEcdUtilMugTypeMsg( INT32 value_2 )
{
    switch ( value_2 )
    {
       case ArMe: return MSG_MKUP_PRG_ARCH4;
       case He:   return MSG_MKUP_PRG_HE;
       default:
       case N2:   return MSG_MKUP_PRG_N2;
    }
}


static U_INT16 GetDetMugTypeMsg( INT32 value_2 )
{
    switch ( value_2 )
    {
       case ArMe: return GLP_MAKEUP_ARCH4;
       case H2:   return GLP_MAKEUP_H2;
       case He:   return MSG_MAKEUP_HE;
       default:
       case N2:   return MSG_MAKEUP_N2;
    }
}

static U_INT16 GetOEMDetGasTypeMsg( INT32 value_2 )
{
    switch ( value_2 )
    {
       case Air : return MSG_OEM_DET_GAS_AIR;
       case ArMe: return MSG_OEM_DET_GAS_ARCH4;
       case H2:   return MSG_OEM_DET_GAS_H2;
       case He:   return MSG_OEM_DET_GAS_HE;
       default:
       case N2:   return MSG_OEM_DET_GAS_N2;
    }
}

static U_INT16 GetDetUtilCalibZeroMsg( INT32 value_2 )
{
    switch ( value_2 )
    {
        case EPC_ECD:  return GLP_EC_PURGE_CALIB_ZERO;
        case EPC_TCD:  return GLP_TC_REF_CALIB_ZERO;
        case EPC_FPD:  return GLP_FPD_UTIL_CALIB_ZERO;
        default:       return GLP_FLAME_AIR_CALIB_ZERO;
    }
}

static U_INT16 GetDetUtilCalibFlowMsg( INT32 value_2 )
{
    switch ( value_2 )
    {
        case EPC_ECD:  return GLP_EC_PURGE_CALIB_FLOW;
        case EPC_TCD:  return GLP_TC_REF_CALIB_FLOW;
        case EPC_FPD:  return GLP_FPD_UTIL_CALIB_FLOW;
        default:       return GLP_FLAME_AIR_CALIB_FLOW;
    }
}

static U_INT16 GetRTTAuxPresMsg( INT32 value_2 )
{
    switch ( value_2 )
    {
        case DISPLAY_PSI: return GLP_PSI_VALUE_MSG;
        case DISPLAY_BAR: return GLP_BAR_VALUE_MSG;
        default:
        case DISPLAY_KPA: return GLP_KPA_VALUE_MSG;
    }
}

static U_INT16 GetOvenTypeMsg( INT32 value_2 )
{
    switch ( (OVEN_TYPE) value_2 )
    {
        case REG_OVEN:    return MSG_REG_OVEN_TYPE;

        case FAST_OVEN:
        default:          return MSG_FAST_OVEN_TYPE;
    }
}

static U_INT16 GetAuxTypeMsg( INT32 value_2 )
{
    switch ( (AUX_TYPE) value_2 )
    {
        case VLV_BOX:    return MSG_VALVE_AUX_TYPE;
        case MSD_AUX:    return MSG_MSD_AUX_TYPE;
        case AED_AUX:    return MSG_AED_AUX_TYPE;
        case NO_AUX:     return MSG_NO_AUX_TYPE;

        case UNKNOWN_AUX:
        default:         return MSG_UNK_AUX_TYPE;
    }
}

static U_INT16 GetCryoTypeMsg( INT32 value_2 )
{
    switch ( (CRYO_TYPE) value_2 )
    {
        default:
        case NO_CRYO:    return MSG_NO_COOLING;

        case N2_CRYO:    return MSG_N2_COOLING;
        case CO2_CRYO:   return MSG_CO2_COOLING;
        case FORCED_AIR: return MSG_AIR_COOLING;
    }
}

/***********************************************************************/
/* FUNCTION:  GetGlpSetptMsgNo                                         */
/* ========                                                            */
/*                                                                     */
/* PURPOSE:  To retrieve the Glp run log header message.  It checks    */
/*           to see if the message should be retrieved by a special    */
/*           purpose function.                                         */
/*                                                                     */
/* RETURNED VALUE:  U_INT16 msg_no                                     */
/*                                                                     */
/* GLOBALS USED: Setpt_Info                                            */
/*                                                                     */
/* CALLS:  GetSignalZeroMsg                                            */
/*                                                                     */
/* LIMITATIONS:                                                        */
/*                                                                     */
/***********************************************************************/

U_INT16 GetGlpSetptMsgNo( SETPT setpt, INT32 value_2 )
{
   switch( Setpt_Info[setpt].conv_code )
   {
      case SIG_ZERO1_CONV:
               return  GetSignalZeroMsg( pSIGNAL1 );

      case SIG_ZERO2_CONV:
               return GetSignalZeroMsg( pSIGNAL2 );

      case SIG_TYPE1_CONV:
               return GetSignalTypeMsg( pSIGNAL1 );

      case SIG_TYPE2_CONV:
               return GetSignalTypeMsg( pSIGNAL2 );

      case COL_COMP1_CONV:
               return GetSccSignalTypeMsg( pCCOMP1 );

      case COL_COMP2_CONV:
               return GetSccSignalTypeMsg( pCCOMP2 );

      case CONV_INJECT_MODE:
               return GetInjectModeMsg( value_2 );

      case CONV_INLET_PRES:
               return GetInletPresMsg( value_2 );

      case CONV_PULSE_PRES:
               return GetInletPulsePresMsg( value_2 );

      case CONV_INLET_GAS_TYPE:
               return GetInletGasTypeMsg( value_2 );

      case CONV_INLET_TYPE:
               return GetInletTypeMsg( value_2 );

      case CONV_CAL_PRES:
               return GetInletCalPresMsg( value_2 );

      case CONV_DET_PRES_CALIB:
               return GetDetCalPresMsg( value_2 );

      case CONV_COL_CONTROL:
               return GetColControlMsg( value_2 );

      case CONV_COL_SOURCE:
               return GetColSourceMsg( value_2 );

      case CONV_COL_OUTLET:
               return GetColOutletMsg( value_2 );

      case CONV_CORRECT_PRES:
               return GetColCorrectPresMsg( value_2 );

      case CONV_COL_PRES:
               return GetColPressureMsg( value_2 );

      case CONV_INIT_PRES:
               return GetInitPresMsg( value_2 );

      case CONV_PRES_RATE1:
               return GetPresRate1Msg( value_2 );

      case CONV_FINAL_PRES1:
               return GetFinalPres1Msg( value_2 );

      case CONV_PRES_RATE2:
               return GetPresRate2Msg( value_2 );

      case CONV_FINAL_PRES2:
               return GetFinalPres2Msg( value_2 );

      case CONV_PRES_RATE3:
               return GetPresRate3Msg( value_2 );

      case CONV_FINAL_PRES3:
               return GetFinalPres3Msg( value_2 );

      case CONV_COL_POST_PRES:
               return GetColPostPresMsg( value_2 );

      case CONV_DET_MKUP_MODE:
               return GetDetMkupModeMsg( value_2 );

      case CONV_DET_UTIL_GAS_ON:
               return GetDetUtilOnMsg( value_2 );

      case CONV_DET_UTIL_GAS_OFF:
               return GetDetUtilOffMsg( value_2 );

      case CONV_DET_UTIL_GAS_FLOW:
               return GetDetUtilFlowMsg( value_2 );

      case  CONV_DET_FPD_UTIL_TYPE:
               return GetDetFpdUtilTypeMsg( value_2 );

      case  CONV_DET_TCD_UTIL_TYPE:
               return GetDetTcdUtilTypeMsg( value_2 );

      case  CONV_DET_ECD_UTIL_TYPE:
               return GetDetEcdUtilTypeMsg( value_2 );

      case  CONV_DET_MUG_TYPE:
               return GetDetMugTypeMsg( value_2 );

      case  CONV_DET_ECD_UTIL_MUG_TYPE:
               return GetDetEcdUtilMugTypeMsg( value_2 );

      case  CONV_DET_TCD_UTIL_MUG_TYPE:
               return GetDetTcdUtilMugTypeMsg( value_2 );

      case  CONV_DET_UTIL_CALIB_ZERO:
               return GetDetUtilCalibZeroMsg( value_2 );

      case  CONV_DET_UTIL_CALIB_FLOW:
               return GetDetUtilCalibFlowMsg( value_2 );

      case  CONV_RTT_AUX_PRES:
               return GetRTTAuxPresMsg( value_2 );

      case  CONV_OVEN_TYPE:
               return GetOvenTypeMsg( value_2 );

      case  CONV_AUX_TYPE:
               return GetAuxTypeMsg( value_2 );

      case  CONV_CRYO_TYPE:
               return GetCryoTypeMsg( value_2 );

      case  CONV_OEM_DET_GAS_TYPE:
               return GetOEMDetGasTypeMsg( value_2 );

      default:
               return Setpt_Info[setpt].glp_msg_no;
   }

}
